package com.isight.web;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping("/")
public class HomeController {

    public static final Logger logger = LoggerFactory.getLogger(HomeController.class);
    
    @RequestMapping(method = RequestMethod.GET)
    public String loadRootPage(Model model) {
        return loadPage();
    }
    
    @RequestMapping(value = "home", method = RequestMethod.GET)
    public String loadHomePage(Model model) {
        return loadPage();
    }
    
    private String loadPage() {
        logger.debug("loading home page...");
        return "home";
    }
}
